package com.qdlc.p2p.dal.dao.impl;



import java.util.List;

import javax.persistence.Query;

import org.springframework.stereotype.Repository;

import com.qdlc.p2p.dal.common.dao.jpa.BaseDaoImpl;
import com.qdlc.p2p.dal.dao.TppTenderLogDao;
import com.qdlc.p2p.dal.dto.TppTenderLog;
@Repository("tppTenderLogDao")
public class TppTenderLogDaoImpl extends BaseDaoImpl<TppTenderLog> implements
		TppTenderLogDao {

	@SuppressWarnings("unchecked")
	@Override
	public TppTenderLog getTppTenderLogByNo(String orderNo) {
		String jpql = " from TppTenderLog where orderNo =?1";
		Query query = em.createQuery(jpql);
		query.setParameter(1, orderNo);
		List<TppTenderLog> list = query.getResultList();
		if (null !=list && list.size()>0) {
			return list.get(0);
		}
		return null;
	}




}
